﻿using System;
using DataObject;
using DataObject.Category;

public partial class Controls_Product_ListPagination : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            ListParentCategory();
    }

    private void ListParentCategory()
    {
        var lstCategory = CategoryController.Category_GetByParentId((int)CategoryType.Product, Constants.PARENT_ROOT, Constants.ACTIVE);

        if (lstCategory != null && lstCategory.Count > 0)
        {
           rptCategory.DataSource = lstCategory;
           rptCategory.DataBind();    
        }
    }
}